<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>火输文本编辑器</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" href="chrome://fireinput/skin/editor.css" type="text/css"/>
    <script type="text/javascript" language="JavaScript1.2">
       function copyToClipboard()
       {
         var source = document.getElementById("editorContext");
         if(source)
         {
            if(source.value.length <= 0)
               return; 
            try {
               var clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
                                    .getService(Components.interfaces.nsIClipboardHelper);
               clipboard.copyString(source.value);
            } 
            catch(e) {}
         }
       }

       function showHelp(e)
       {
         var id = document.getElementById("helpContext"); 
         var mouseY = e.clientY + document.body.scrollTop + 
                       document.documentElement.scrollTop;
         var mouseX = e.clientX + document.body.scrollLeft +
                       document.documentElement.scrollLeft;
         if(id.style.display == "block")
         {
            id.style.display = "none"; 
            return; 
         }

         id.style.display = "block"; 
         id.style.left = (mouseX - 220) + "px"; 
         id.style.top = (mouseY + 20) + "px";
       }
    </script>
</head>
<body onLoad="document.getElementById('editorContext').focus();">
    <div id="fireinputLocalEditor" class="localEditor">
        <div class="editorHead">火输文本编辑器</div>
        <div class="helpHead">
            <div class="helpMenu" onclick="showHelp(event)">帮助</div>
        </div>
        <div>
          <textarea id="editorContext" class="editorContext"></textarea>
        </div>
        <div class="editorAction">
          <input type=button name=copy value="复制到剪贴板" onclick="copyToClipboard()">
        </div>
    </div>
    <div class="helpContext" id="helpContext">
      <div class="helpContextItem">
            <span class="helpContextKey">PageDown或.：</span>
            <span class="helpContextKeyValue">向下翻页</span>
      </div>
      <div class="helpContextItem">
            <span class="helpContextKey">PageUp或,：</span>
            <span class="helpContextKeyValue">向上翻页</span>
      </div>

      
      <div class="helpContextItem">
            <span class="helpContextKey">Home：</span>
            <span class="helpContextKeyValue">翻到首页</span>
      </div>

      <div class="helpContextItem">
            <span class="helpContextKey">End：</span>
            <span class="helpContextKeyValue">翻到末页</span>
      </div>

      <div class="helpContextItem">
            <span class="helpContextKey">Ctrl+空格：</span>
            <span class="helpContextKeyValue">切换中英文</span>
      </div>
      <div class="helpContextItem">
            <span class="helpContextKey">shift：</span>
            <span class="helpContextKeyValue">暂时切换到英文</span>
      </div>
      <div class="helpContextItem">
            <span class="helpContextKey">CTRL+Alt+M：</span>
            <span class="helpContextKeyValue">切换全/半角</span>
      </div>
      <div class="helpContextItem">
            <span class="helpContextKey">CTRL+Alt+P：</span>
            <span class="helpContextKeyValue">切换标点符号</span>
      </div>
      
      <div class="helpContextItem">
            <span class="helpContextKey">数字键：</span>
            <span class="helpContextKeyValue">选择字词</span>
      </div>
      <div class="helpContextItem">
            <span class="helpContextKey">Ctrl+数字键：</span>
            <span class="helpContextKeyValue">组合新词组</span>
      </div>
      <div class="helpContextItem">
           <span class="helpContextKey">F2：</span>
           <span class="helpContextKeyValue">重复前一次输入</span>
      </div>
      <div class="helpContextItem">
           <span class="helpContextKey">Esc：</span>
           <span class="helpContextKeyValue">清除输入码</span>
      </div>
   </div>
</body>
</html>

